<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
  <link rel="stylesheet" type="text/css" href="${path}/css/public.css" />
  <link rel="stylesheet"
        href="${path}/css/themes/base/jquery.ui.all.css">
  <link rel="stylesheet" href="${path}/js/demos.css">


  <script type="text/javascript"
          src="${path}/js/jquery-1.7.2.js"></script>
  <script type="text/javascript"
          src="${path}/js/jquery.ui.core.js"></script>
  <script type="text/javascript"
          src="${path}/js/jquery.ui.widget.js"></script>
  <script type="text/javascript"
          src="${path}/js/jquery.ui.position.js"></script>
  <script type="text/javascript"
          src="${path}/js/jquery.ui.autocomplete.js"></script>
  <%--<script type="text/javascript"--%>
          <%--src="${path}/js/jquery.ui.datepicker.js"></script>--%>
  <%--<script type="text/javascript"--%>
          <%--src="${path}/js/jquery.ui.datepicker-zh-CN.js"></script>--%>
  <script src="${path}/js/jquery.ui.button.js"></script>
  <link rel="stylesheet" href="${path}/css/icons.css">
  <script src="${path}/js/icons.js"></script>

  <title>编辑员工</title>
</head>
<body>
<input id="path" value="${path }" type="hidden">
<!--头部-->
<div class="header">

  <div class="top">
    <div class="top_left">
      <span class="f1">欢迎您：${user.username}</span>
    </div>
    <div class="top_right">
      <a href="${path}/index.jsp" class="top_ico0">首页</a>
      <a href="${path}/initUpdatePassword.action" class="top_ico1">修改密码</a>
      <a href="${path}/user/initPersonalInfo.action" class="top_ico2">个人信息</a>
      <a href="${path}/logout.action" class="top_ico3">退出</a>
    </div>
  </div>
  <div class="top2">
    <p class="pro_id">客户关系管理系统 v2.0</p>
  </div>
</div>

<!--主体-->
<table class="main" border="0"
       style="width: 100%; background-color: #FFFFFF">
  <tr>
    <td width="140" style="vertical-align: top;">
      <div class="main_left">



        <script type="text/javascript" src="${path}/js/jquery.ui.accordion.js"></script>

        <script type="text/javascript">
            $().ready(function() {
                $('.menuTitle').click(function() {//添加menuTitle的click事件
                    if ($(this).next().is(":hidden")) {//隐藏判断
                        $('.menu_ul_div').slideUp();//隐藏 */
                        $(this).next().slideDown();//显示
                    } else {
                        if ($(this).next().attr("id") == 'menu_ul_div_1') {

                            $('.menu_ul_div').slideUp();//隐藏 */
                            $('#menu_ul_div_2').slideDown();//显示

                        }
                        ;
                        if ($(this).next().attr("id") == 'menu_ul_div_2') {

                            $('.menu_ul_div').slideUp();//隐藏 */
                            $('#menu_ul_div_3').slideDown();//显示

                        }
                        ;
                        if ($(this).next().attr("id") == 'menu_ul_div_3') {

                            $('.menu_ul_div').slideUp();//隐藏 */
                            $('#menu_ul_div_4').slideDown();//显示

                        }
                        if ($(this).next().attr("id") == 'menu_ul_div_4') {

                            $('.menu_ul_div').slideUp();//隐藏 */
                            $('#menu_ul_div_1').slideDown();//显示

                        }
                    }
                });
            });
        </script>
        <div class="sidebar">

          <h2 id="menu1" class="menuTitle">客户管理</h2>
          <div class="menu_ul_div" id="menu_ul_div_1"

               style="display:none;">
            <ul id="menu1_ul" class="menu_ul">
              <li class="menuItem"><a href="${path}/customer/initConflict.action">客户冲突</a></li>
              <li class="menuItem"><a href="${path}/customer/initAdd.action">添加客户</a></li>
              <li class="menuItem"><a href="${path}/customer/initServe.action">服务中签约客户</a></li>
              <li class="menuItem"><a href="${path}/customer/initNoServe.action">未签约客户</a></li>
              <li class="menuItem"><a href="${path}/customer/initNoServeFirst.action">未签约-已初试</a></li>
              <li class="menuItem"><a href="${path}/customer/initNoServeSecond.action">未签约-已复试</a></li>
              <li class="menuItem"><a href="${path}/customer/getAllSea.action">公海客户</a></li>
              <li class="menuItem"><a href="${path}/visitRecord/initSearch.action">拜访查询</a></li>
            </ul>
          </div>


          <h2 id="menu2" class="menuTitle">合同管理</h2>
          <div class="menu_ul_div" id="menu_ul_div_2"

               style="display:none;">
            <ul id="menu2_ul" class="menu_ul">
              <li class="menuItem"><a href="${path}/contractTemplate/initList.action">合同模版</a></li>
              <li class="menuItem"><a href="${path}/contract/initAdd.action">新增合同</a></li>
              <li class="menuItem"><a href="${path}/contract/initContractValid.action">有效合同查询</a></li>
              <li class="menuItem"><a href="${path}/contract/initContractInvalid.action">无效合同查询</a></li>
              <li class="menuItem"><a href="${path}/contract/initPaymentReceivable.action">应收款查询</a></li>
              <li class="menuItem"><a href="${path}/contract/initPaymentReceived.action">到款查询</a></li>
            </ul>
          </div>


          <h2 id="menu3" class="menuTitle">报表管理</h2>
          <div class="menu_ul_div" id="menu_ul_div_3"

               style="display:none;">
            <ul id="menu3_ul" class="menu_ul">
              <li class="menuItem"><a href="${path}/report/initReport.action">拜访量报表</a></li>
            </ul>
          </div>


          <h2 id="menu4" class="menuTitle">系统设置</h2>
          <div class="menu_ul_div" id="menu_ul_div_4"
               style="display:block;"
          >
            <ul id="menu4_ul" class="menu_ul">
              <li class="menuItem"><a href="${path}/system/search.action">员工设置</a></li>
              <li class="menuItem"><a href="${path}/announcement/search.action">公告管理</a></li>
              <li class="menuItem"><a href="${path}/system/elses.action">其他设置</a></li>
            </ul>
          </div>

        </div>
      </div>
    </td>
    <td style="vertical-align: top;">
      <div class="main_right">
        <link rel="stylesheet" href="${path}/css/themes/base/jquery.ui.all.css">
        <script src="${path}/js/jquery-1.7.2.js"></script>
        <script src="${path}/js/jquery.ui.core.js"></script>
        <script src="${path}/js/jquery.ui.widget.js"></script>
        <script src="${path}/js/jquery.ui.button.js"></script>
        <link rel="stylesheet" href="${path}/css/demos.css">

        <link rel="stylesheet" href="${path}/css/icons.css">

        <script src="${path}/js/icons.js"></script>
        <script type="text/javascript">
            $(function(){
                $("#chooseRole").click(function(){
                    var config="resizable:no;center:yes;dialogWidth:500px;dialogHeight:250px;dialogTop:200px;dialogLeft:150px";
                    showModalDialog("${path}/user/initRoleList.action?id=${id}", document ,config);
                });
            });
        </script>
        <style type="text/css">
          .mytable{
            width: 60%;
          }
          .mytable td{
            width: 200px;
          }
        </style>

        <body>
        <!-- 中部DIV -->
        <div class="content">
          <div class="pageHead">
            <table>
              <tr>
                <th width="8"><img src="${path}/images/c_l.gif" height="31" width="8"/></th>
                <th align="left" class="title_area">当前位置：客户管理 &gt; 编辑员工信息</th>
                <th width="9"><img src="${path}/images/c_r.gif" height="31" width="9"></th>
              </tr>
            </table>
          </div>
          <div class="pageBody">
            <form:form id="update" name="update" action="${path}/user/commitUser?id=${id}" method="post" modelAttribute="user1">
              <input type="hidden" name="user.id" value="f03759ef-c160-41f4-9bfc-21ed31431ea6" id="update_user_id"/>
              <input type="hidden" name="user.version" value="0" id="update_user_version"/>
              <table class="mytable">
                <tr>
                  <th>工号</th>
                  <td>
                    <input type="text" name="user.empNo" value="${user.empNo}" id="update_user_empNo" disabled/>
                    <%--<span class="required">*</span>--%>
                  </td>
                </tr>
                <tr>
                  <th>姓名</th>
                  <td>
                    <input type="text" name="user.realName" value="${user.username}" id="update_user_realName" disabled/>
                    <%--<span class="required">*</span>--%>
                  </td>
                </tr>
                <tr>
                  <th>登陆账号</th>
                  <td>
                    <input type="text" name="user.username" value="${user.username}" id="update_user_username" disabled/>
                    <%--<span class="required">*</span>--%>
                  </td>
                </tr>
                <tr>
                  <th>账号状态</th>
                  <td>
                      <form:radiobutton path="valid" value="1" label="启用" />
                      <form:radiobutton path="valid" value="0" label="禁用" />
                      <form:errors path="valid" cssClass="error" />
                  </td>
                </tr>
                <tr>
                  <th>所属部门</th>
                  <td>
                    <select name="dept.id" id="update_user_dept_id" disabled>
                      <option value="0c92e3fb-4e7e-44d9-8633-9d37206caa96"
                              <c:if test="${dept=='6f3ab444-cacd-407d-92c1-e9d4b1f81333'}">selected="selected"</c:if>>天智教育</option>
                      <option value="ec49cec0-1626-4244-b02d-774a4d4e54d1"
                              <c:if test="${dept=='22389afa-be60-4507-8f45-dddd41c1b89f'}">selected="selected"</c:if>>总经理室</option>
                      <option value="3fa77b37-8965-4fda-bfa8-b7a453a3a386"
                              <c:if test="${dept=='0a8d4e62-de95-4daf-99fe-ae13210c6b95'}">selected="selected"</c:if>>渠道部</option>
                      <option value="6e6cd6f6-a614-4795-ae76-dba276afc0ca"
                              <c:if test="${dept=='362f2013-6ca6-4dc9-b8fa-290599d0f421'}">selected="selected"</c:if>>市场部</option>
                      <option value="fa400a01-944e-43ce-bd37-ea9c2f12d095"
                              <c:if test="${dept=='6c53f69a-5360-49e3-b5dd-d3164101ea53'}">selected="selected"</c:if>>职业发展部</option>
                      <option value="d21346de-fa4c-4bce-999f-b96b29cec63c"
                              <c:if test="${dept=='31417009-b489-4952-a5a5-c2561425fb6d'}">selected="selected"</c:if>>财务部</option>
                      <option value="227ae7f8-6f60-4b7b-b12f-0bfc023cd59f"
                              <c:if test="${dept=='7d8e881a-2d8a-4a35-88c1-95789f0921e7'}">selected="selected"</c:if>>员工部</option>
                      <option value="cd898e7f-e750-4123-bb4a-b9fe07344053"
                              <c:if test="${dept=='2a301cb8-0fbd-4981-b0a8-b2829242ff61'}">selected="selected"</c:if>>学员部</option>
                    </select>
                  </td>
                </tr>
                <tr>
                  <th>客户上限</th>
                  <td>
                    <input type="text" name="user.maxCustomer" value="${user.maxCustomer}" id="update_user_maxCustomer" disabled/>
                    <%--<span class="required">*</span>--%>
                  </td>
                </tr>
                <tr>
                  <th>性别</th>
                  <td>
                    <form:radiobutton path="gender" value="MALE" label="男" />
                    <form:radiobutton path="gender" value="FEMALE" label="女" />
                    <form:errors path="gender" cssClass="error" />
                  </td>
                </tr>
                <tr>
                  <th>生日</th>
                  <td>
                    <%--<input type="text" readonly="readonly" name="user.birthDate" class="date" value="${user.birthDate}">--%>
                      <%--<input class="Wdate" type="text"  value="${user.birthDate}" readonly onClick="WdatePicker()"/>--%>
                    <%--<form:input path="birthDate"></form:input>--%>
                    <%--<form:errors path="birthDate"></form:errors>--%>
                    <input type="text" name="birth" value="<fmt:formatDate value="${user.birthDate}" pattern="yyyy-MM-dd"></fmt:formatDate>">
                  </td>
                </tr>
                <c:if test="${empty roles}">该员工尚未分配角色</c:if>
                <c:if test="${!empty roles}">
                <tr>
                  <th>
                    <a id="chooseRole" href="#">选择角色</a>
                  </th>
                  <td>
                    <input type="text" name="roleNames" value="${roles}" readonly="readonly" id="roleListDisplay"/>
                    <input type="hidden" name="roleIds" value="${roleIds}"  id="roleListHidden" />
                    <span class="required">*</span>
                  </td>
                </tr>
                </c:if>
                <tr>
                  <th>手机</th>
                  <td>
                    <form:input path="telephone"></form:input>
                    <form:errors path="telephone"></form:errors>
                  </td>
                </tr>
                <tr>
                  <th>备注</th>
                  <td>
                    <%--<textarea name="user.remarks" cols="18" rows="4" id="update_user_remarks">${user.remarks}</textarea>--%>
                    <form:textarea path="remarks"></form:textarea>
                    <form:errors path="remarks"></form:errors>
                  </td>
                </tr>
              </table>

              <div class="buttonBar">
                <%--<a href="userList">查看员工列表</a>--%>
                <button id="btnSave" type="submit">保存</button>
              </div>

            </form:form>
          </div>
        </div>
        </body>
      </div>
    </td>
  </tr>
</table>

<!--尾部-->
<div class="footer">


  <div class="seperator"></div>
  <p>
    <a href="http://www.sztzedu.com">公司主站</a>|
    <a href="#">隐私策略</a>|
    <a href="#">服务条款</a>&nbsp;
    苏州天智教育公司&reg;版权所有 2012-2015
  </p>

</div>
</body>
</html>
